//
//  QunalityDetaileTableViewCell.m
//  MyProject
//
//  Created by dllo on 15/10/30.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//
#import "QunalityDetaileTableViewCell.h"
#define widtht self.contentView.bounds.size.width
#define heigh self.contentView.bounds.size.height
@implementation QunalityDetaileTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.number = [[UIImageView alloc] init];
        [self.contentView addSubview:self.number];
        
        self.title = [[UILabel  alloc] init];
        [self.contentView addSubview:self.title];
        
        self.desc = [[UILabel alloc] init];
        [self.contentView addSubview:self.desc];
        self.desc.textColor = [UIColor grayColor];
        self.desc.font = [UIFont systemFontOfSize:13];

        
        self.pic = [[UIImageView alloc] init];
        [self.contentView addSubview:self.pic];
        
        self.pricePic = [[UIImageView alloc] init];
        [self.contentView addSubview:self.pricePic];
        self.pricePic.image = [UIImage imageNamed:@"iconfont-5-2.png"];
        
        self.price = [[UILabel alloc] init];
        [self.contentView addSubview:self.price];
        self.price.textColor = [UIColor grayColor];
        

 
        
        
    }
    return self;
    
}

- (void)layoutSubviews
{
    self.number.frame = CGRectMake(5, 10, 30, 30);
    
    self.title.frame = CGRectMake(45, 10, widtht - 45, 30);
    
    self.desc.frame = CGRectMake(5, 50, widtht - 10, 30);
    self.desc.numberOfLines = 5;
    [self.desc sizeToFit];
    self.pic.frame = CGRectMake(5, 60 + self.desc.bounds.size.height, widtht - 10, 330);
    
    self.pricePic.frame = CGRectMake(widtht / 4 * 3 - 50, 50 + self.desc.bounds.size.height + 340, 35, 30);
    
    self.price.frame = CGRectMake(widtht / 4 * 3  - 10,  50 + self.desc.bounds.size.height + 340, widtht - (widtht / 4 * 3 -10), 30);
    


}










- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
